package com.ming.luckyDemo.service;

import com.ming.luckyDemo.pojo.DO.UserInfoDO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Tcm
 */

public interface RegisterService {

    /**
     * 执行sql，将用户信息存入数据库
     * @param userInfoDO
     */
    void insertUser(@RequestBody UserInfoDO userInfoDO);

    /**
     * 通过cookie的用户名查重、校验密码等
     * @param username
     * @return
     */
    UserInfoDO queryByName(@RequestParam String username);

    /**
     * 登录校验
     * @param userInfoDO
     * @return
     */
    boolean login(@RequestBody UserInfoDO userInfoDO);

    /**
     * 带有cookie的二次登录的校验
     * @param cookieName
     * @return
     */
    UserInfoDO login2(@RequestParam String cookieName);
}
